home *** CD-ROM | disk | FTP | other *** search
- Path: news.compuserve.com!newsmaster
- From: 100435.736@compuserve.com (David A. Mair)
- Newsgroups: comp.lang.c++
- Subject: Re: Directories under DOS
- Date: Mon, 01 Apr 1996 09:59:42 GMT
- Organization: CompuServe Incorporated
- Message-ID: <4jo61f$3f4@arl-news-svc-4.compuserve.com>
- References: <4j6obs$htl@newsbf02.news.aol.com>
- NNTP-Posting-Host: dd35-167.compuserve.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- jacqimarie@aol.com (Jacqimarie) wrote:
-
- >I am writing several programs that must search large directories
- >frequently (it is not uncommon to have close to 2000 entries in one
- >directory). Right now, I am using the functions findfirst and findnext,
- >and I am wondering if anybody could point me to faster, more efficient
- >functions to read directories. The only information I need from the
- >directory is the filename and the status of the archive bit.
-
- One of the deficiences of MS-DOS is that the more files you have in a
- directory the slower file system operations become in that directory.
- The best way to improve performance is to open the directory as a file
- (apart from the root directory it is stored just like a file). You
- may have to read the file system structures yourself to do this. You
- can then read the entire directory into memory in a single operation
- and access it at memory speed. You can even organise it to suit your
- application. The Microsoft MS-DOS programmer's reference will help
- you build the structures to manage the directory (which is just an
- array of these structures).
-
- Regards
- David.
-
-